<div>资源管理</div>


<form id="resFrm"> </br>
	name:<input id="name" name="name" /> </br>
	url:<input id="url" name="url" /> </br>
	code:<input id="code" name="code" /> </br>
	type:<input id="type" name="type" /></br>
	isenable:<input id="isenable" name="isenable" /></br>
	userid:<input id="userid" name="userid" /></br>
	organid<input id="organid" name="organid" /></br>
	 </br>
	
	</br>资源列表</br>
	
	
	
	
		#foreach($res in $message)
		
			 资源id: 	${res.name}   ,资源名称${res.name}, 资源URL　${res.url}
		#end

	<button type="submit" id="btn" >提交</button>
</form>



<script type="text/javascript">
	alert(1);
	var submitUrl="${path}/resource/add";
	var local_href="${path}/resource/index";
	var name=$("#name").val();
	
	$("#btn").click(function(){
		
		alert("zhixing js");
		var param=$("#resFrm").serialize();
		$.post(submitUrl,param,function(result){
		  
			if(result.code=="9999"){
				alert("操作失败");
			}else{
				alert("操作成功");
			}
			
			 window.location.href=local_href;
			
		},"json");
		
	})
	
	

</script>